<!DOCTYPE html>
<html>
<head>
<title>req_assign</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<link rel="stylesheet" type="text/css"
	href="/codebase/fonts/font_roboto/roboto.css" />
<link rel="stylesheet" type="text/css" href="/codebase/dhtmlx.css" />
<script type="text/javascript" src="/codebase/dhtmlxform.js" />
<style>
div#simpleLog {
	height: 200px;
	font-family: Roboto, Arial, Helvetica;
	font-size: 14px;
	color: #404040;
	overflow: auto;
}



</style>
<script>
	var myForm;
	
	var customCss = {
		video_bitrate : "validate_magenta",
		video_codec : "validate_orange"
	};
	
	function doOnLoad() {		
		
		myForm=new dhtmlXForm("form_1");
		myForm.loadStruct("/common/testmanager/test_new_select_req_no_reqno_data.xml");	
		myForm.attachEvent("onButtonClick", function(name){
		     if(name=='next_submit'){
		    	 this.send("/test/test_new_select_req_no_reqno_save",callback);
		     }
		});				
	}	
	
	var callback=function () {
		//alert("callback");
		
		if(arguments[1]>0){
			alert("保存需求成功");	
			parent.document.getElementById("select_req_id").innerHTML=arguments[1];
			parent.parent.dhxWins.window("select_req_window").close();			
			//myForm.clear();
			//var myUploader = myForm.getUploader("myFiles");
			//myUploader.clear();
			//window.location.assign("/test/test_new_details?req_id="+arguments[1]);
			//myLayout.cells("a").attachURL("/test/test_new_details?req_id="+arguments[1], true);   // collapse layout's cell
			
			 
		}
		else{
			alert("保存需求失败，错误信息："+arguments[1]);
		}
	}
</script>
</head>
<body onload="doOnLoad();">
<div id="select_req_id" name="select_req_id" th:text="${req_id}" style="display: none;" > </div>
	<table>
		<tr>
			<td>
				<div id="form_1" ></div>
			</td>
		</tr>
	</table>		
	<table>
		<tr>
			<td>
				<div id="my_tabbar" ></div>
			</td>
		</tr>
	</table>
	<table>
		<tr>
			<td>
				<div id="form_btn" style="padding-left: 50px;"></div>
			</td>
		</tr>
		
	</table>
</body>
</html>